﻿<%@ Page Language="C#" MasterPageFile="~/Shared/DialogPage.Master" AutoEventWireup="true" CodeBehind="SelectInstrumentCatrgory.aspx.cs" Inherits="Runda.CMS.Portal.Lookup.SelectInstrumentCatrgory" StylesheetTheme="GlobleTheme" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../Content/global.css" rel="stylesheet" type="text/css" />
    <script src="../Content/global.js" type="text/javascript"></script>
    <link href="../Content/Menu/Menu.css" rel="stylesheet" type="text/css" />
    <link href="../Content/Tab/tabs.css" rel="stylesheet" type="text/css" />
    
<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow;
        else if (window.frameElement.radWindow)
            oWindow = window.frameElement.radWindow;
        return oWindow;
    }

    function CloseWindow() {
        var oWindow = GetRadWindow();
        oWindow.Argument = '';
        oWindow.Close();
    }

    function SaveAndCloseWindow() {
        var oWindow = GetRadWindow();
        oWindow.Argument = 'changed';
        oWindow.Close();
    }

    function SaveAndCloseWindow1(arg) {
        var oWindow = GetRadWindow();
        oWindow.Argument = arg;
        oWindow.Close();
    }

    //用Treeview chekbox节点单选的处理事件   
    function TreeSingleSelect(treeID, checkNode) {
        if (!treeID)
            return;
        var objs = document.getElementsByTagName("input");
        for (var i = 0; i < objs.length; i++) {
            if (objs[i].type == 'checkbox') {
                var obj = objs[i];
                if (obj.id.indexOf(treeID) != -1) {
                    if (obj != checkNode) {
                        obj.checked = false;
                    }
                }
            }
        }
    }
    //用于给TreeView的 chebox添加 单击事件(如果要将某一TreeView变为单选择 只需调用下面方法)   
    function SetTreeNodeClickHander(treeID) {
        var objs = document.getElementsByTagName("input");
        for (var i = 0; i < objs.length; i++) {
            if (objs[i].type == 'checkbox') {
                var obj = objs[i];
                if (obj.id.indexOf(treeID) != -1) {
                    objs[i].onclick = function() { TreeSingleSelect(treeID, this); };
                }
            }
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div style="margin: 5px 0 5px 0">
    </div>
    <table class="mnubar" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td style="padding-left: 5px" nowrap>
                    <b>仪器类别</b>
                </td>
                <td style="padding-left: 5px">
                    <img src="../Content/Grid/separator.gif">
                </td>
                <td class="icMenu" nowrap> 
                </td>
                <td class="icMenu mnuRight" nowrap>
                      
                </td>
            </tr>
        </tbody>
    </table> 
    <div style="display: inline" id="appForm_tab0" class="tab">
        
            <div style="overflow:scroll;width:480px;height:200px">
                <asp:TreeView ID="TreeView_DataList" runat="server" ShowCheckBoxes="Leaf" 
                    ShowLines="True">
                </asp:TreeView>
                </div>
        <asp:Button ID="btnOK" runat="server" Text="确定" CssClass="button" 
                onclick="btnOK_Click"/>
    </div>
  <script type="text/javascript">
      SetTreeNodeClickHander("<%=TreeView_DataList.ClientID%>");
    </script>
</asp:Content>
